home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2006 November
/
PCWorld_2006-11_cd.bin
/
domacnost a kancelar
/
easytime
/
ETT.exe
/
reports
/
xslt
/
SummaryTimesheetGroupByTask.xsl
< prev
Wrap
Extensible Markup Language
|
2006-08-18
|
3KB
|
93 lines
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" indent="yes"/>
<xsl:template match="/">
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css"></link>
</head>
<xsl:apply-templates select="/Report/HeaderInfo"/>
<xsl:apply-templates select="/Report/Customer"/>
<xsl:apply-templates select="/Report/Total"/>
</html>
</xsl:template>
<!-- Верхний заголовок -->
<xsl:template match="HeaderInfo">
<table align="center" width="80%">
<tr>
<td class="TableSB">
<table class="TableSB" width="100%" cellpadding="2" cellspacing="0" >
<tr>
<td colspan="2" align="center" class="ReportTitleClass"><xsl:value-of select="/Report/@Type"/></td>
</tr>
<xsl:if test="Date"> <!--Если явно выбран диапазон дат -->
<tr>
<td colspan="2" align="right" class="Date">Date range: <xsl:value-of select="Date/From"/> - <xsl:value-of select="Date/To"/></td>
</tr>
</xsl:if>
</table>
</td>
</tr>
</table>
</xsl:template>
<xsl:template match="Customer">
<!-- Список tak'ов -->
<table align="center" width="80%">
<tr>
<td class="CompanyName"><xsl:value-of select="@Name"/></td>
</tr>
<xsl:for-each select="Project">
<!-- <xsl:if test="SubTotal != "0:00""> -->
<table align="center" width="80%">
<tr>
<td valign="top" class="ProjectName" colspan="2">Project: <span class="Pname"><xsl:value-of select="@Name"/></span></td>
</tr>
<tr><td class="ProjectName">Tasks:</td></tr>
<xsl:for-each select="Task">
<tr>
<td width="85%" valign="top" class="DetailRowDataClass"><xsl:value-of select="@Name"/></td>
<td width="15%" valign="top" class="DetailRowDataClass1"><xsl:value-of select="@Hours"/></td>
</tr>
</xsl:for-each>
<tr>
<td width="85%" valign="top" class="SubTotal">Sub-total: </td>
<td width="15%" valign="top" class="DetailRowDataClass2"><xsl:value-of select="SubTotal"/></td>
</tr>
</table>
</xsl:for-each>
</table>
</xsl:template>
<xsl:template match="Companies/Company">
<xsl:value-of select="text()"/>
<xsl:if test="following-sibling::*/text()">, </xsl:if>
</xsl:template>
<xsl:template match="Projects/Project">
<xsl:value-of select="text()"/>
<xsl:if test="following-sibling::*/text()">, </xsl:if>
</xsl:template>
<xsl:template match="Tasks/Task">
<xsl:value-of select="text()"/>
<xsl:if test="following-sibling::*/text()">, </xsl:if>
</xsl:template>
<xsl:template match="/Report/Total">
<table align="center" width="80%">
<tr>
<td width="85%" class="Total">Total:</td>
<td class="Total"><xsl:value-of select="text()"/></td>
</tr>
</table>
</xsl:template>
</xsl:stylesheet>